import Vue from 'vue'
import VueRouter from 'vue-router'

import LoginView from "@/views/LoginView.vue";
import ListView from "@/views/ListView.vue";
import UploadView from "@/views/UploadView.vue";
import TlistView from "@/views/TlistView.vue";
import AddView from "@/views/AddView.vue";
import OderView from "@/views/OderView.vue";


Vue.use(VueRouter)

const routes = [

  {
    path: '/login',
    name: 'login',
    component: LoginView
  },
  {
    path: '/list',
    name: 'list',
    component: ListView
  },
  {
    path: '/upload',
    name: 'upload',
    component: UploadView
  },

  {
    path: '/tlist',
    name: 'tlist',
    component: TlistView
  },
  {
    path: '/add',
    name: 'add',
    component: AddView
  },
  {
    path: '/oder',
    name: 'oder',
    component:OderView
  },
]

const router = new VueRouter({
  mode:'history',
  routes
})
// 导航守卫

export default router
